#pragma once
/***********************************************************************************************
COPYRIGHT 2011 Mafahir Fairoze

This file is part of Neural++.
(Project Website : http://mafahir.wordpress.com/projects/neuralplusplus)

Neural++ is a free software. You can redistribute it and/or modify it under the terms of
the GNU General Public License as published by the Free Software Foundation, either version 3
of the License, or (at your option) any later version.

Neural++ is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the GNU General Public License <http://www.gnu.org/licenses/> for more details.

***********************************************************************************************/

#include <string>
using namespace std;

namespace NeuralPlusPlus
	{
	namespace Core        
		{
		/// <summary>
		/// This static class contains all helper functions used in this->project.
		/// </summary>
		class Helper
			{
			/// <summary>
			/// Initializes the Random functions.
			/// </summary>
			public: static void SeedRandom();

					/// <summary>
					/// Validates that a value is not <c>NULL</c>.
					/// </summary>
			public: static void ValidateNotNull(void *value, string name);


					/// <summary>
					/// Validates that a numerical argument is not negative
					/// </summary>
			public: static void ValidateNotNegative(double value, string name);

					/// <summary>
					/// Validates that a numerical argument is positive
					/// </summary>
			public: static void ValidatePositive(double value, string name);

					/// <summary>
					/// Validates that a numerical argument is within the given range
					/// </summary>
			public: static void ValidateWithinRange(double value, double min, double max, string name);

					/// <summary>
					/// Random Generator. Returns a random double between 0 and 1
					/// </summary>
			public: static double GetRandom();

					/// <summary>
					/// Random Generator. Returns a random double between specified minimum and maximum values
					/// </summary>
			public: static double GetRandom(double min, double max);

					/// <summary>
					/// Generates an array of given size containing integers from 0 to 'size - 1' in random order
					/// </summary>
			public: static int* GetRandomOrder(int size);

					/// <summary>
					/// Normalizes a vector of doubles
					/// </summary>
			public: static double* Normalize(double* vector, int vectorLength, double magnitude = 1);

					/// <summary>
					/// Helper::to obtain random normal values
					/// </summary>
			public: static double* GetRandomVector(int count, double magnitude);
			};

		class Size
			{

			public:	int Width;
			public: int Height;
			public: Size(void)
						{
						Width = 0; 
						Height  = 0;
						}
			public: Size(int width, int height)
						{
						this->Width = width;
						this->Height = height;
						}
			};
		class Point
			{
			public:	int X;
			public: int Y;
			public: Point(void)
						{
						X = 0; 
						Y  = 0;
						}
			public: Point(int x, int y)
						{
						this->X = x;
						this->Y = y;
						}
			};
		}    
	}